#include "c_precompiled.h"
#include "cl_local.h"

void WindowListener::windowClosed(Ogre::RenderWindow *win){
	//we should land in Client::update()
	throw Ogre::Exception(Ogre::Exception::ERR_NOT_IMPLEMENTED,"","");
}

bool WindowListener::mouseMoved( const OIS::MouseEvent &arg ){
	ClientSystem::getSingleton().onMouseMove(arg.state.relX,arg.state.relY);
	return true;
}
bool WindowListener::mousePressed( const OIS::MouseEvent &arg, OIS::MouseButtonID id ){
	ClientSystem::getSingleton().onMouseDown(arg.state.abX,arg.state.abY,id);
	return true;
}
bool WindowListener::mouseReleased( const OIS::MouseEvent &arg, OIS::MouseButtonID id ){
	ClientSystem::getSingleton().onMouseUp(arg.state.abX,arg.state.abY,id);
	return true;
}

bool WindowListener::keyPressed( const OIS::KeyEvent &arg ){
	ClientSystem::getSingleton().onKeyDown(arg.key,arg.text);
	return true;
}
bool WindowListener::keyReleased( const OIS::KeyEvent &arg ){
	ClientSystem::getSingleton().onKeyUp(arg.key,arg.text);
	return true;
}